import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Commodity from './views/commodity/Commodity.vue'
import User from './views/user/User.vue'
import Position from './views/position/Position.vue'
import PromoteTpl from './views/promote/PromoteTpl.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '商品',
        iconCls: 'el-icon-message',//图标样式class
        leaf: true,//只有一个节点
        children: [
            { path: '/commodity', component: Commodity, name: '商品列表'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '广告位',
        iconCls: 'fa fa-id-card-o',
        leaf: true,//只有一个节点
        children: [
            { path: '/position', component: Position, name: '广告位管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '推广模板',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/promotetpl', component: PromoteTpl, name: '推广模板管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户',
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点
        children: [
            { path: '/user', component: User, name: '用户中心' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;